package com.tanhq.mystock.controller;

import com.tanhq.mystock.service.RabbitMQService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/rabbitmq")
public class RabbitMQController {

    @Autowired
    private RabbitMQService rabbitMQService;

    @PostMapping("/send")
    public String send(@RequestParam String message) {
        rabbitMQService.sendMessage(message);
        return "Message sent!";
    }
} 